//
// Created by juno on 2021/9/11.
//
#include <json.h>

#ifndef WEBCHART_ROOM_MESSAGE_H
#define WEBCHART_ROOM_MESSAGE_H
#include "ws_server.h"

enum {
    GET_TOKEN,
    NORMAL_MSG,
    JOIN_ROOM,
    GET_ROOM_LIST,
    LEAVE_ROOM,
    CREATE_ROOM
};

int process_message(struct session_context *ctx, json_object *msg);
size_t insert_message(struct session_context *ctx, const char *src, const char *name, int value, int type, const char *str);
#endif //WEBCHART_ROOM_MESSAGE_H
